# $OpenBSD$

COMMENT =	simple GTK+ screenshot application
V_HASH =	7b344552db6c12a2388680888a7767991bd3eb79
# first seven chars of git commit hash
V_HASH_SHORT =	7b34455
# <commit year>.<commit month>.<first seven chars from git commit hash>
V =		2018.03.git${V_HASH_SHORT}
PKGNAME =	simpleshot-gtk-${V}
DISTNAME =	${V_HASH}
EXTRACT_SUFX =	.zip
WRKDIST =	${WRKDIR}/simpleshot-gtk-${V_HASH}
CATEGORIES =	graphics

HOMEPAGE =	https://github.com/Tomaszal/simpleshot-gtk
MAINTAINER =	Adnan Shameem <adnan360@protonmail.com>

# GNU General Public License v3.0
PERMIT_PACKAGE =	Yes

MASTER_SITES =	https://github.com/Tomaszal/simpleshot-gtk/archive/

BUILD_DEPENDS =	devel/pkgconf
LIB_DEPENDS =	x11/gtk+3 \
				graphics/slop
RUN_DEPENDS =	devel/desktop-file-utils

WANTLIB += atk-1.0 c cairo cairo-gobject gdk-3 gdk_pixbuf-2.0
WANTLIB += gio-2.0 glib-2.0 gobject-2.0 gtk-3 harfbuzz intl pango-1.0
WANTLIB += pangocairo-1.0 slopy

USE_GMAKE =	Yes
NO_TEST =	Yes

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/simpleshot ${PREFIX}/bin

	${INSTALL_DATA_DIR} ${PREFIX}/share/applications/
	${SUBST_DATA} ${FILESDIR}/simpleshot.desktop \
		${PREFIX}/share/applications/simpleshot.desktop
	@chown ${SHAREOWN}:${SHAREGRP} \
		${PREFIX}/share/applications/simpleshot.desktop

	${INSTALL_DATA_DIR} ${PREFIX}/share/glib-2.0/schemas/
	${INSTALL_DATA} ${WRKSRC}/com.tomaszal.simpleshot.gschema.xml \
		${PREFIX}/share/glib-2.0/schemas/

	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/${PKGNAME}
	${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/${PKGNAME}

.include <bsd.port.mk>
